from multiprocessing import Process,Queue
from time import sleep

def hashaki(q):
    while 1:
        a=q.get()
        print(a)

def YPL(q,a):
    print("YPL")
    q.put(a)
    sleep(2)

if __name__=='__main__':
    q=Queue()
    p1=Process(target=hashaki,args=(q,))
    p1.start()
    i=0
    while 1:
        YPL(q,i)
        i+=1
'''
YPL
0
YPL
1
YPL
2
YPL
3
YPL
4
YPL
5
YPL
6
YPL
7
YPL
8
YPL
9
YPL
10
YPL
11
YPL
'''